#ifndef RMSQLMANAGER_H
#define RMSQLMANAGER_H

#include <QObject>

#include <QSqlDatabase>
#include <QSqlError>
#include <QSqlQuery>
#include "../rmutils.h"

class RMSqlManager : public QObject
{
    Q_OBJECT
public:
    explicit RMSqlManager(QObject *parent = nullptr);

    static RMSqlManager* gSQLInstance;

    void initDB();
    bool openDB();
    bool closeDB();
    int initTables();
    //select user
    int checkUserCount(QString phone,QString pwd);

signals:

public slots:

private:
    QSqlDatabase database;
};

#endif // RMSQLMANAGER_H
